{include file='common/head'}
<style>
</style>
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href=" {:url('index/index/welcome')}">首页</a>
        <a href="">演示</a>
        <a href="">
          <cite>实名认证</cite></a>
      </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="{:url('reals/shiming')}" title="刷新">
        <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div class="x-body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                <select name="cateid">
                    <option value="">搜索关键词</option>
                    <option value="uname">姓名</option>
                    <option value="phone">手机号码</option>
                    <option value="f_user.uid">用户id</option>
					<option value="f_real.rid">认证id</option>
                </select>
            </div>
            <input type="text" name="Key"  placeholder="请输入关键词" autocomplete="off" class="layui-input">
           <span>发布时间</span><input class="layui-input" placeholder="开始日" name="datemin" id="start">至
            <input class="layui-input" placeholder="截止日" name="datemax" id="end">
            <input type="submit" name="sub" class="layui-btn" value="开始搜索" lay-submit="" lay-filter="sreach">
        </form>
    </div>
    <xblock>
        <!--<a href="{:url('index/admin/add')}" class="layui-btn"><i class="layui-icon"></i>添加</a>-->
		<a href="attest" class="layui-btn layui-bg-orange">实名认证<i class="iconfont"></i><i class="iconfont">&#xe6ae;</i></a>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>NO</th>
            <th>用户id</th>
            <th>头像</th>
            <th>手机号码</th>
            <th>姓名</th>
            <th>身份证号</th>
            <th>身份证正面</th>
            <th>身份证反面</th>
            <th>套餐</th>
            <th>支付费用</th>
            <th>提交时间</th>
            <th>认证状态</th>
			<th>失败原因</th>
            <th colspan="2">操作</th>
		</tr>
	
        </thead>
        <tbody>
        {volist name="res" id="res"}
                <tr>
            <td>{$key+1}</td>
            <td>{$res.uid}</td>
            <td>{if $res.avatars_img==''}<img src="{$res.head_portrait}" width="40">{else /}<img src="/upload/portrait/{$res.avatars_img}" width="40">{/if}</td>
            <td>{$res.phone}</td>
            <td>{$res.uname}</td>
            <td>{$res.card}</td>
            <td><img src="/upload/real/{$res.front_img}" width="50" height="50"></td>
            <td>
			  <div class="gallery">
			    <div>
					<img src="/upload/real/{$res.reverse_img}" width="50" height="50">
				</div>
			  </div>
			</td>
            <td class="td-statu1s">{$res.phase_time}个月</td>
            <td class="td-stat1us">{$res.price}元</td>
            <td class="t1d-status">{$res.s_createtime}</td>
             <td class="td-status">
              <span class="layui-btn layui-btn-normal layui-btn-disabled layui-btn-mini">{if $res.rflg==4} 认证中 {/if}{if $res.rflg==1} 成功 {/if}{if $res.rflg==2} 修改中 {/if}{if $res.rflg==3} 过期{/if}{if $res.rflg==0} 未认证 {/if}</span></td>
			<td class="t1d-status">{$res.Reason}</td>
            <td class="td-manage" colspan="2">
			{if $res.rflg==4} 
              <a onclick="member_stop(this,'{$res.uid}')" href="javascript:;"  title="通过">
                <i class="layui-icon">&#xe642;</i>通过
              </a>
              <a title="驳回" onclick="x_admin_show('原因','erro?id={$res.rid}',600,400)"  href="javascript:;">
                <i class="layui-icon">&#xe640;</i>驳回
              </a>
			{/if}
			<a title="查看详情" onclick="x_admin_show('查看详情','details?id={$res.rid}',600,400)"  href="javascript:;">
                <i class="layui-icon">&#xe63c;</i>查看详情
              </a>
            </td>
        </tr>
          {/volist}
		<tr>
		<td colspan="14"><div class="page">
				<div>
					{$page}
				</div>
		   </div>
		  </td>
	</tr>

	<!-- <tr> -->
		<!-- <td colspan="14"><div class="page"> -->
				<!-- <div> -->
					<!-- {$page} -->
				<!-- </div> -->
		   <!-- </div> -->
		  <!-- </td> -->
	<!-- </tr> -->
	       
        </tbody>
    </table>
</div>
<script>
	  function member_stop(obj,id){
		  layer.confirm('确认要通过吗？',function(index){
			$.ajax({
				url:'{:URL("reals/suero")}',
				data:{'id':id},
				type:'post',
				dataType:'json',
				success:function(msg){
				 if(msg.code==1){
					$(obj).attr('title','成功')
					$(obj).find('i').html('&#xe62f;');
					$(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('成功');
					$(obj).parents("tr").find(".td-manage").html('');
					layer.msg('成功!',{icon: 1,time:1000});
				 }
				}
			  });
		  });
      }
	 layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#start' //指定元素
        });

        //执行一个laydate实例
        laydate.render({
            elem: '#end' //指定元素
        });
    });
</script>
</body>

</html>